package service;

import model.Address;

import java.util.List;

/**
 * @Description:
 * @Author one world
 * @Date 2020/9/23 0023 11:09
 */
public interface AddressService {
    /**
     * 查找用户的所有收货地址
     * @param id
     * @return List<Address>
     */
    public List<Address> findByUserId(int id);

    /**
     * 根据id地址
     * @param id
     * @return Address
     */
    public Address findById(Integer id);

    /**
     * 添加地址
     * @param address
     * @return boolean
     */
    public boolean add(Address address);

    /**
     * 删除地址
     * @param id
     * @return boolean
     */
    public boolean del(Integer id);

    /**
     * 更新地址
     * @param address
     * @return boolean
     */
    public boolean update(Address address);

    /**
     *根据订单编号查询收货地址
     * @param order_no
     * @return Address
     */
    public Address findByOrderNo(String order_no);
}
